fix(wireguard): emit UTC log timestamps#47
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
the utc method call is correct but the format have changed incorrectly, format you refer is RFC 3339 and is used for api response this change will cause dual behavior in logging system |
|
I updated the PR to keep |
Summary
This pull request changes WireGuard log timestamps to use UTC while keeping the project's standard Go log timestamp format.
The previous WireGuard log timestamp used local time. Keeping the existing
YYYY/MM/DD HH:mm:sslog format avoids a second timestamp style in the logging system, while using UTC makes log ordering clearer across hosts and timezones.WireGuard Logging
time.Now().UTC()inbackend/wireguard/log.go.backend/wireguard/wireguard_lifecycle_test.go.Why This Is Better
Node logs are often compared with panel-side events when debugging traffic accounting, sync behavior, or node restarts. Local timestamps make that comparison ambiguous when services run in different timezones.
Using UTC while preserving the existing log format avoids dual log styles and keeps ordering clear across machines, containers, and log collectors.